﻿using SqlSugar;

namespace Shop.Model.Entity.Jur;

/// <summary>
/// 6.3 用户角色
/// </summary>
[SugarTable("jur_user_role")]
public class JurUserRole: BaseEntity
{
    /// <summary>
    /// 用户ID
    /// </summary>
    public long UserId { get; set; }

    /// <summary>
    /// 角色ID
    /// </summary>
    public long RoleId { get; set; }
    
    /// <summary>
    /// 创建时间
    /// </summary>
    [SugarColumn(IsOnlyIgnoreInsert = true)]
    public DateTime CreateTime { get; set; }
    
    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdateTime { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(JurUserRole.RoleId))]
    public JurRole Role { get; set; }
}